Support inline images in the timeline#5877
Conversation
|
KonfettiView is crashing on API 21, independently from this change. If I uncomment KonfettiView, this change seems fine. |
| GlideImagesPlugin.create(object : GlideImagesPlugin.GlideStore { | ||
| override fun load(drawable: AsyncDrawable): RequestBuilder<Drawable> { | ||
| val url = drawable.destination | ||
| if (url.startsWith("mxc://")) { |
There was a problem hiding this comment.
Neat: You could use this handy extension fun String.isMxcUrl(): https://github.com/vector-im/element-android/blob/main/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/MatrixUrls.kt#L31
|
(crash about Konfetti has been handled by #5926 and the fix will be available in 1.4.14) |
|
I can confirm that huge images are an issue here :( |
|
Forgot to bump, but huge image crashes appear to be fixed with 11c9eb9 . I don't know right now if there is a better way than putting a somewhat arbitrary size in there, but it doesn't appear to have any noticeable negative effect on image quality for me. |
|
Thanks for the update. Should be fine to merge this PR now, can I ask you to fix the conflict please? |
vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt
Outdated
Show resolved
Hide resolved
Match the code style below, that also does individual calls for multiple plugins.
|
Done! |
|
(Fixing the conflict again) |
bmarty
left a comment
There was a problem hiding this comment.
Thanks for the update! Will squash and merge.
Type of change
Content
Add GlideImagesPlugin for handling images in markwon, as suggested in #351 .
Motivation and context
#351
Screenshots / GIFs
Tests
On desktop, send a message with inline image, e.g.
/html <img src="mxc://..." alt="alt" title="title" height="128" />Tested devices
Checklist
Signed-off-by: Tobias Büttner [email protected]